import {BaseEntity, Column, Entity, Index, JoinColumn, JoinTable, ManyToMany, ManyToOne, OneToMany, OneToOne, PrimaryColumn, PrimaryGeneratedColumn, RelationId} from 'typeorm';

@Entity('fa_category', {schema: "fastadmin" } )
@Index('weigh', ['weigh', "id"])
@Index('pid', ['pid', ])
export class fa_category {

    @PrimaryGeneratedColumn({
        type:'int',
        name:'id'
        })
    id: number;

    @Column('int', {
        nullable: false,
        default: () => '\'0\'',
        name: "pid",
        })
    pid: number;

    @Column('varchar', {
        nullable: false,
        length: 30,
        name: "type",
        })
    type: string;

    @Column('varchar', {
        nullable: false,
        length: 30,
        name: "name",
        })
    name: string;

    @Column('varchar', {
        nullable: false,
        length: 50,
        name: "nickname",
        })
    nickname: string;

    @Column('enum', {
        nullable: false,
        name: "flag",
        })
    flag: string;

    @Column('varchar', {
        nullable: false,
        length: 100,
        name: "image",
        })
    image: string;

    @Column('varchar', {
        nullable: false,
        name: "keywords",
        })
    keywords: string;

    @Column('varchar', {
        nullable: false,
        name:'description'
        })
    description: string;

    @Column('varchar', {
        nullable: false,
        length: 30,
        name:'diyname'
        })
    diyname: string;

    @Column('int', {
        nullable: true,
        name: "createtime",
        })
    createtime: number | null;

    @Column('int', {
        nullable: true,
        name:'updatetime'
        })
    updatetime: number | null;

    @Column('int', {
        nullable: false,
        default: () => '\'0\'',
        name:'weigh'
        })
    weigh: number;

    @Column('varchar', {
        nullable: false,
        length: 30,
        name: "status",
        })
    status: string;

}
